/**
* All Rights Reserved , Copyright (C) 2021 , 青岛鼎信通讯股份有限公司
*
* MpmProjectSuperviseServiceAuto
* 项目督办
*
* 修改纪录
* 2021-07-28 版本：1.0 wudaliang 创建。
* @version 版本：1.0
* @author 作者：wudaliang
* 创建日期：2021-07-28
*/

package com.topscomm.mpm.service.impl.auto;

import javax.annotation.Resource;
import com.topscomm.basic.IBasicDao;
import com.topscomm.tap.common.DatacodeCache;
import java.util.Map;
import com.topscomm.mpm.*;
import com.topscomm.mpm.pojo.MpmProjectSuperviseEntity;
import com.topscomm.mpm.dao.IMpmProjectSuperviseDao;


public class MpmProjectSuperviseServiceAuto extends MpmService<MpmProjectSuperviseEntity,IMpmProjectSuperviseDao> {

	/**
	 * @author: wudaliang
	 * @date: 2021-07-28
	 * @param mapRow
	 * @description:设置字段显示值
	 * @modify:
	 */
	@Override
	public void setDispFields(Map<String, Object> mapRow, DatacodeCache datacodeCache) {
		String temp;
		if (mapRow.get("orgname") != null) {
			temp = mapRow.get("orgname").toString();
			mapRow.put("disporgname", datacodeCache.getValueDynamic("CboOrg", temp, "code", "name"));
		}
		if (mapRow.get("supervisestate") != null) {
			temp = mapRow.get("supervisestate").toString();
			mapRow.put("dispsupervisestate", datacodeCache.getValueDynamic("MpmSuperviseState", temp, "code", "name"));
		}
		if (mapRow.get("superviseobjecttype") != null) {
			temp = mapRow.get("superviseobjecttype").toString();
			mapRow.put("dispsuperviseobjecttype", datacodeCache.getValueDynamic("MpmSuperviseObjectType", temp, "code", "name"));
		}
		if (mapRow.get("flowid") != null) {
			temp = mapRow.get("flowid").toString();
			mapRow.put("dispflowid", datacodeCache.getValueDynamic("ApprovalFlow_EhrEmployeeFamilyParent", temp, "id", "name"));
		}
		if (mapRow.get("state") != null) {
			temp = mapRow.get("state").toString();
			mapRow.put("dispstate", datacodeCache.getValueDynamic("TapApprovalBillState", temp, "code", "name"));
		}
		if (mapRow.get("enabled") != null) {
			temp = mapRow.get("enabled").toString();
			mapRow.put("dispenabled", datacodeCache.getValueDynamic("CboYesNo", temp, "code", "name"));
		}
	}

	@Override
	@Resource(name = "mpmProjectSuperviseDao")
	public void setDao(IBasicDao<MpmProjectSuperviseEntity> dao) {
		super.setDao(dao);
	}
}
